﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NopSolutions.NopCommerce.Common.Utils;

namespace NopSolutions.NopCommerce.Web.Templates.Lucene
{
    public partial class LuceneKeywords : BaseLuceneFilterableControl
    {
        public override void BindData(LuceneHelper.FilterEventArgs e)
        {
            tbKeywords.Text = e.FilterContext.KeyWords;
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            Response.Redirect(CommonHelper.ModifyQueryString(CommonHelper.GetThisPageUrl(true),
                                                             "searchterms=" + Server.UrlEncode(tbKeywords.Text.Trim()),
                                                             string.Empty));
        }
    }
}